<script setup>
import CustomLayout from './CustomLayout.vue'
import { ref } from 'vue'

const slotName = ref('header')
const changeSlotName = () => {
  slotName.value = slotName.value === 'header' ? 'footer' : 'header'
}
</script>

<template>
  <button @click="changeSlotName">Toggle</button>
  <CustomLayout>
    <!-- <template #footer>
      <span>2024 &copy; 刘龙彬</span>
    </template> -->

    <template #[slotName]>
      <h1>标题</h1>
    </template>

    <p>这是正文中的段落</p>
    <p>这是正文中的段落</p>
    <p>这是正文中的段落</p>
  </CustomLayout>
</template>
